package chamster.maeander;

import java.util.List;

import chamster.MaeanderHamster;
import chamster.statemachine.HamsterState;

public class RightForewardRight extends ShiftState {

	public RightForewardRight(HamsterState<MaeanderHamster> stateToShiftTo) {
		super(stateToShiftTo);
	}

	public List<HamsterState<MaeanderHamster>> applyState(
			List<HamsterState<MaeanderHamster>> states,
			MaeanderHamster hamster) throws Exception {
		hamster.turnRight();
		hamster.foreward();
		hamster.turnRight();
		states.add(super.getStateToShiftTo());
		return states;
	}

	public boolean isApplicable(MaeanderHamster hamster) {
		return hamster.getView().canMoveRight();
	}

}
